'use strict';
const db = uniCloud.database();
const dbcmd = db.command;
exports.main = async (event, context) => {
	let appid
	let dataId = event.queryStringParameters.id
	if (dataId) {
		let entitlement = await db.collection('wmz-entitlement').doc(dataId).get()
		entitlement = entitlement.data[0]
		appid = entitlement.appid
	}
	return appid
};